package cn.tedu.oop;
/**本类用于练习面向对象入门案例2*/
//描述汽车
public class TestCreateClass2 {
    public static void main(String[] args) {
        car c=new car();
        c.start();
        c.stop();
        c.brand="大众";
        c.color="red";
        c.price=250000;
        c.gear="手动挡";
        System.out.println(c.color);
        System.out.println(c.brand);
        System.out.println(c.gear);
        System.out.println(c.price);
        System.out.println(c);

    }
}
class car{
    String brand;
    String color;
    double price;
    String gear;
    public void start(){
        System.out.println("我的车车启动了~");
    }
    public void stop(){
        System.out.println("哎呀，熄火了~");
    }
   
}